<template>
  <div class="home">
    <img alt="Vue logo" src="../assets/logo.png">
    <HelloWorld msg="Welcome to Your Vue.js App"/>

    <ua-togsel></ua-togsel>


    <el-button type="primary" @click="visible = true">点击查看弹窗</el-button>
    <ua-dialog 
    text="这是一个弹窗实例"
    :visi="visible"
    @uadialogSubmitAction="uadialogSubmitAction" >
        <span>这是一段信息</span>
    </ua-dialog>
  </div>
  
</template>

<script>
// @ is an alias to /src
import HelloWorld from '@/components/HelloWorld.vue'

export default {
    name: 'Home',
    data(){
        return {
            visible : false
        }
    },
    methods:{
        uadialogSubmitAction(o){
            if(o == "0"){
                return this.visible=false;
            }
            if(o == "1"){
                this.visible = false;
            }
        }
    },
    components: {
        HelloWorld
    }
}
</script>
